import request from '@/utils/request'

export default {
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `admin/hosp/hospitalSet/querypagehosp/${current}/${limit}`,
      method: 'post',
      data: searchObj//使用json
    })
  },
  deleteHospSet(id) {
    return request({
      url: `admin/hosp/hospitalSet/${id}`,
      method: 'delete',
    })
  },
  batchRemoveHospSet(idlist) {
    return request({
      url: `admin/hosp/hospitalSet/batchhosptailset`,
      method: 'delete',
      data: idlist
    })
  },
  lockHospSet(id, status) {
    return request({
      url: `/admin/hosp/hospitalSet/lockhosptailset/${id}/${status}`,
      method: 'put'
    })
  },
  //添加医院设置
  saveHospSet(hospitalSet) {
    return request({
      url: `/admin/hosp/hospitalSet/addhosptailset`,
      method: 'post',
      data: hospitalSet
    })
  },
  //院设置id查询
  getHospSet(id) {
    return request({
      url: `/admin/hosp/hospitalSet/queryhosptailsetbyid/${id}`,
      method: 'get'
    })
  },
  //修改医院设置
  updateHospSet(hospitalSet) {
    return request({
      url: `/admin/hosp/hospitalSet/updatehosptailset`,
      method: 'post',
      data: hospitalSet
    })
  },
}
